<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@include file="../comum/CabecalhoTaglibComum.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>PAQS | Programa de Avaliação de Qualidade de Software</title>
<style>
<jsp:include page="/comum/geral.css"/>
</style> 
</head>
<f:view>
<body>
	<h:form id="projetoForm">
<%@include file="../comum/CabecalhoComum.jsp"%>
<%@include file="../comum/CabecalhoUsuarioComum.jsp"%>
<div class="corpo">
<%@include file="../comum/Mensagem.jsp"%>
<h2><h:outputText value="Meus Projetos"></h:outputText></h2>
<h:messages globalOnly="true" showDetail="true"/>

<h:dataTable value="#{pc_ListaProjetos.projetos}" var="projeto"
 width="100%" headerClass="dataTableHeader" rendered="#{!empty pc_ListaProjetos.projetos}">
	<h:column>
		<f:facet name="header">
			<h:outputText value="Nome do Projeto"/>
		</f:facet>
		<h:outputText value="#{projeto.nome}"></h:outputText>
	</h:column>
	<h:column>
		<f:facet name="header">
			<h:outputText value="Editar"></h:outputText>
		</f:facet>
		<h:commandLink action="#{pc_ListaProjetos.editar}" value="Editar">
			<f:param name="projetoId" value="#{projeto.idProjeto}"></f:param>
		</h:commandLink>
	</h:column>
	<h:column>
		<f:facet name="header">
			<h:outputText value="Excluir"></h:outputText>
		</f:facet>
		<h:commandLink value="Excluir" action="#{pc_ListaProjetos.excluir}">
			<f:param name="projetoId" value="#{projeto.idProjeto}"></f:param>
		</h:commandLink>
	</h:column>
</h:dataTable>
<h:outputText value="Nenhum projeto cadastrado" rendered="#{empty pc_ListaProjetos.projetos}"></h:outputText>
<p>
<h:commandButton styleClass="ButtonClass" value="Novo Projeto" action="#{pc_ListaProjetos.novoProjeto}"></h:commandButton>
</div>
<%@include file="../comum/RodapeComum.jsp"%>
</h:form>
</body>
</f:view>
</html>